package com.lg.thread.day01;

/**
 * 多个线程数据不共享
 *
 * @author LG93
 * @create 2017-08-09 17:12
 **/
public class MyThread4 extends Thread {

    private int count = 5;


    public MyThread4(String name) {
        this.setName(name);
    }

    @Override
    public void run() {
        super.run();
        while (count > 0) {
            count--;
            System.out.println("由 " + this.currentThread().getName() + "计算，count = " + count);
        }

    }
}
